<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h:form id="form">
            <table style="text-align: center;">
                <tr>   
                    <td>
                        <label>Highlight a place or an address</label><br/>
                        <p:autoComplete 
                            id="acSimple" 
                            value="#{autoCompleteView.txt1}" var="it" 
                            itemLabel="#{it}" itemValue="#{it}" 
                            completeMethod="#{autoCompleteView.completeText}">
                            <p:ajax event="itemSelect"  update="@form"  listener="#{autoCompleteView.searchGoogleMap()}"/> 
                        </p:autoComplete>

                    </td>
                    <td>
                        <div>
                            <iframe id="autotag" width="600" height="450"   frameborder="0" style="border:0"
                                    src="#{autoCompleteView.path}">
                            </iframe>
                        </div>
                    </td>
                </tr>
            </table>
        </h:form>
    </h:body>
</html>

